package com.unittec.drainage.provider.utils;

import java.io.PrintWriter;
import java.io.StringWriter;


public class ExceptionUtil {

	/**
	 * 返回错误信息字符串
	 * 
	 * @param t Throwable
	 * @return 错误信息字符串
	 */
	public static String getExceptionMessage(Throwable t) {
		StringWriter sw = new StringWriter();
		PrintWriter pw = new PrintWriter(sw);
		t.printStackTrace(pw);
		return sw.toString();
	}
	


}
